package com.ty.day4;

/**
 * Created by IntelliJ IDEA.
 * Author : txy
 * Create 2023/10/31 11:39
 */
public class Five {
    public static void main(String[] args) {
        double s = 100, sum = s;
        for (int i = 0; i < 10; i++) {
            s = s / 2;
            sum = sum + s * 2;
            System.out.println("第" + (i + 1) + "次一共经过：" + sum + "米，第" + (i + 1) + "反弹：" + s + "米");
        }
        System.out.println("一共经过：" + (sum - s) + "米" + "\n第10次反弹" + s + "米");
    }
}
